home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / termlib.man < prev    next >
Encoding:
Text File  |  1989-01-01  |  5.3 KB  |  133 lines

  1.  
  2.  
  3.  
  4. TERMLIB               C Library Procedures                TERMLIB
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      tgetent, tgetnum, tgetflag, tgetstr, tgoto, tputs - terminal
  10.      independent operation routines
  11.  
  12. SSYYNNOOPPSSIISS
  13.      cchhaarr PPCC;;
  14.      cchhaarr **BBCC;;
  15.      cchhaarr **UUPP;;
  16.      sshhoorrtt oossppeeeedd;;
  17.  
  18.      ttggeetteenntt((bbpp,, nnaammee))
  19.      cchhaarr **bbpp,, **nnaammee;;
  20.  
  21.      ttggeettnnuumm((iidd))
  22.      cchhaarr **iidd;;
  23.  
  24.      ttggeettffllaagg((iidd))
  25.      cchhaarr **iidd;;
  26.  
  27.      cchhaarr **
  28.      ttggeettssttrr((iidd,, aarreeaa))
  29.      cchhaarr **iidd,, ****aarreeaa;;
  30.  
  31.      cchhaarr **
  32.      ttggoottoo((ccmm,, ddeessttccooll,, ddeessttlliinnee))
  33.      cchhaarr **ccmm;;
  34.  
  35.      ttppuuttss((ccpp,, aaffffccnntt,, oouuttcc))
  36.      rreeggiisstteerr cchhaarr **ccpp;;
  37.      iinntt aaffffccnntt;;
  38.      iinntt ((**oouuttcc))(());;
  39.  
  40. DDEESSCCRRIIPPTTIIOONN
  41.      These functions extract and use capabilities from a terminal
  42.      capability data base, usually /etc/termcap, the format of
  43.      which is described in _t_e_r_m_c_a_p(5).  These are low level rou-
  44.      tines; see _c_u_r_s_e_s(3X) for a higher level package.
  45.  
  46.      _T_g_e_t_e_n_t extracts the entry for terminal _n_a_m_e into the buffer
  47.      at _b_p. _B_p should be a character buffer of size 1024 and must
  48.      be retained through all subsequent calls to _t_g_e_t_n_u_m, _t_g_e_t_-
  49.      _f_l_a_g, and _t_g_e_t_s_t_r. _T_g_e_t_e_n_t returns -1 if none of the termcap
  50.      data base files could be opened, 0 if the terminal name
  51.      given does not have an entry, and 1 if all goes well.  It
  52.      will look in the environment for a TERMCAP variable.  If
  53.      found, and the value does not begin with a slash, and the
  54.      terminal type _n_a_m_e is the same as the environment string
  55.      TERM, the TERMCAP string is used instead of reading a
  56.      termcap file.  If it does begin with a slash, the string is
  57.      used as a path name of the termcap file to search.  If
  58.      TERMCAP does not begin with a slash and _n_a_m_e is different
  59.      from TERM, _t_g_e_t_e_n_t searches the files $HOME/.termcap and
  60.  
  61.  
  62.  
  63. Sprite v1.0            September 14, 1987                       1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TERMLIB               C Library Procedures                TERMLIB
  71.  
  72.  
  73.  
  74.      /etc/termcap, in that order, unless the environment variable
  75.      TERMPATH exists, in which case it specifies a list of file
  76.      pathnames (separated by spaces or colons) to be searched
  77.      instead.  Whenever multiple files are searched and a ttcc
  78.      field occurs in the requested entry, the entry it names must
  79.      be found in the same file or one of the succeeding files.
  80.      This can speed up entry into programs that call _t_g_e_t_e_n_t, as
  81.      well as help debug new terminal descriptions or make one for
  82.      your terminal if you can't write the file /etc/termcap.
  83.  
  84.      _T_g_e_t_n_u_m gets the numeric value of capability _i_d, returning
  85.      -1 if is not given for the terminal.  _T_g_e_t_f_l_a_g returns 1 if
  86.      the specified capability is present in the terminal's entry,
  87.      0 if it is not.  _T_g_e_t_s_t_r returns the string value of the
  88.      capability _i_d, places it in the buffer at _a_r_e_a, and advances
  89.      the _a_r_e_a pointer.  It decodes the abbreviations for this
  90.      field described in _t_e_r_m_c_a_p(5), except for cursor addressing
  91.      and padding information.  _T_g_e_t_s_t_r returns NULL if the capa-
  92.      bility was not found.
  93.  
  94.      _T_g_o_t_o returns a cursor addressing string decoded from _c_m to
  95.      go to column _d_e_s_t_c_o_l in line _d_e_s_t_l_i_n_e. It uses the external
  96.      variables UUPP (from the uupp capability) and BBCC (if bbcc is given
  97.      rather than bbss) if necessary to avoid placing \\nn, ^^DD or ^^@@
  98.      in the returned string.  (Programs which call tgoto should
  99.      be sure to turn off the XTABS bit(s), since _t_g_o_t_o may now
  100.      output a tab.  Note that programs using termcap should in
  101.      general turn off XTABS anyway since some terminals use
  102.      control-I for other functions, such as nondestructive
  103.      space.) If a %% sequence is given which is not understood,
  104.      then _t_g_o_t_o returns "OOPS".
  105.  
  106.      _T_p_u_t_s decodes the leading padding information of the string
  107.      _c_p; _a_f_f_c_n_t gives the number of lines affected by the opera-
  108.      tion, or 1 if this is not applicable, _o_u_t_c is a routine
  109.      which is called with each character in turn.  The external
  110.      variable _o_s_p_e_e_d should contain the output speed of the ter-
  111.      minal as encoded by _s_t_t_y(3).  The external variable PPCC
  112.      should contain a pad character to be used (from the ppcc capa-
  113.      bility) if a null (^^@@) is inappropriate.
  114.  
  115. FFIILLEESS
  116.      /usr/lib/libtermlib.a  -ltermlib library
  117.      /etc/termcap           standard terminal capability data
  118.      base
  119.      $HOME/.termcap         user's terminal capability data base
  120.  
  121. SSEEEE AALLSSOO
  122.      ex(1), curses(3X), termcap(5)
  123.  
  124. AAUUTTHHOORR
  125.      William Joy
  126.  
  127.  
  128.  
  129. Sprite v1.0            September 14, 1987                       2
  130.  
  131.  
  132.  
  133.